package com.wit.WEB.service.impl;

import com.wit.WEB.entity.Danger;
import com.wit.WEB.mapper.DangerMapper;
import com.wit.WEB.service.DangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: java-web-group
 * @description:
 * @author: KingTeng
 * @create: 2022-03-13 14:19
 **/
@Service
public class DangerServiceimpl implements DangerService {
    private DangerMapper dangerMapper;
    @Autowired
    private void setDangerMapper(DangerMapper dangerMapper){
        this.dangerMapper=dangerMapper;
    }

    @Override
    public List<Danger> findAll() {
        return dangerMapper.findAll();
    }

    @Override
    public void AddDanger(Danger danger) {
        dangerMapper.insertSelective(danger);
    }

    @Override
    public void deleteByCity(String city) {
        dangerMapper.deleteByCity(city);
    }


}
